/********************************************************************************
Name:  PreferredContactPhone
Copyright © 2012  HFH International
======================================================
======================================================
Purpose:
-------
To make only one active Contact Phone as preferred. 
======================================================
======================================================
History 
-------
VERSION  AUTHOR                DATE        DETAIL              
  1.0  - CG DEV TEAM    7/10/2012   INITIAL DEVELOPMENT  
*********************************************************************************/ 
trigger PreferredContactPhone on Contact_Phone__c(before insert,before update,before delete) {

ContactPhoneTriggerHandler  triggerhandler=new ContactPhoneTriggerHandler();  
       if(trigger.isInsert && trigger.isBefore){
           triggerhandler.ContactPhoneInsert(trigger.new);       
        }
        if(trigger.isupdate && trigger.isBefore){
           triggerhandler.ContactPhoneUpdate(trigger.new,trigger.old);       
        }
        if(trigger.isdelete && trigger.isBefore){
           triggerhandler.ContactPhoneDelete(trigger.old);       
        }
}